import Vue from "vue"
import VueRouter from "vue-router"
import one from "@/pages/01.one"
import two from "@/pages/02.two"
import three from "@/pages/03.three"
// import four from "@/pages/04.four"

Vue.use(VueRouter)


let routes = [
    {
        path:"/",
        component:()=>import("@/pages/cartPage")
    },
    {
        path: "/one",
        component: one,
        children:[
            {
                path: "discd",
                component: () => import("@/pages/01.one/discd")
            },
            {
                path: "discd1",
                component: () => import("@/pages/01.one/discd1")
            }
        ]

    },
    {
        path: "/two",
        component: two
    },
    {
        path: "/three",
        component: three
    },
    {
        path: "/four/:id",
        component: () => import("@/pages/04.four")
    },
    {
        path: "/list",
        component: () => import("@/pages/05.list")
    },
    {
        path: "/details/:productid",
        component: () => import("@/pages/06.details")
    },
    {
        path: "*",
        component: () => import("@/pages/07.404la")
    },
]


let router = new VueRouter({
    routes
})

export default router